using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;

public class UIItemToolTip : UIToolTip
{
    [SerializeField] private TextMeshProUGUI itemNameText;
    [SerializeField]private TextMeshProUGUI itemText;
    [SerializeField] private TextMeshProUGUI itemDescription;
    [SerializeField] private int defaultFontSize = 32;
    public void ShowToolTip(ItemData_Equipment item)
    {
        if (item == null) return;
        itemNameText.text = item.itemName;
        itemText.text = item.equipmentType.ToString();
        itemDescription.text = item.GetDescription();
        AdjustFontSize(itemNameText);
        AdjustPosition();
        gameObject.SetActive(true);
    }
    public void HideToolTip()
    {
        itemNameText.fontSize = defaultFontSize;
        gameObject.SetActive(false);
    }
}
